package com.topscomm.appv2.xxlJob;

import com.topscomm.appv2.Appv2Service;
import com.topscomm.appv2.service.impl.AppUserUseInfoService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;


import javax.annotation.Resource;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @param
 * @author:
 * @date:2021-10-15
 * @return
 * @descripyion:定时通知人力专员和管理员存在游离的法人部门
 * @modify:
 */
@JobHandler(value = "CdmcSyncRoleJob")
@Component
public class CdmcSyncRoleJob extends IJobHandler {
	@Resource(name = "cdmcSqlSessionTemplate")
	private SqlSessionTemplate cdmcSqlSessionTemplate;
    @Autowired
    private AppUserUseInfoService appUserUseInfoService;
    @Override
    public ReturnT<String> execute(String param) throws Exception {
        appUserUseInfoService.SyncRoleAndUserRole("cdmc",cdmcSqlSessionTemplate);
        return ReturnT.SUCCESS;
    }


}
